import request from "@/utils/request";

export function getCourse(params) {
  return request({
    url: "/dish/page",
    method: "get",
    params,
  });
}
export function changeStatus(data) {
  return request({
    url: "/dish",
    method: "put",
    data,
  });
}
export function addCourse(data) {
  return request({
    url: "/dish",
    method: "post",
    data,
  });
}
export function deleteCourse(ids) {
  return request({
    url: `/dish?ids=${ids}`,
    method: "delete",
  });
}
export function getCourseById(id) {
  return request({
    url: `/dish/${id}`,
    method: "get",
  });
}
export function getDishes(params) {
  return request({
    url: `/category/list?type=1`,
    method: "get",
    params
  });
}

export function upload(data) {
  return request({
    url: "/common/upload",
    method: "post",
    data
  });
}


